using Boo.Lang;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using UnityEngine;

[Serializable]
public class restart : MonoBehaviour
{
	[Serializable]
	[CompilerGenerated]
	internal sealed class _0024restart_0024445 : GenericGenerator<WaitForSeconds>
	{
		internal restart _0024self__0024447;

		public _0024restart_0024445(restart self_)
		{
			_0024self__0024447 = self_;
		}

		public override IEnumerator<WaitForSeconds> GetEnumerator()
		{
			return new _0024(_0024self__0024447);
		}
	}

	[Serializable]
	[CompilerGenerated]
	internal sealed class _0024find_0024448 : GenericGenerator<WaitForSeconds>
	{
		internal restart _0024self__0024450;

		public _0024find_0024448(restart self_)
		{
			_0024self__0024450 = self_;
		}

		public override IEnumerator<WaitForSeconds> GetEnumerator()
		{
			return new _0024(_0024self__0024450);
		}
	}

	public AudioClip clip;

	public bool show;

	public restartbutton restartbutton;

	public back back;

	public threeroundsystem system;

	public float start;

	public float end;

	public restart()
	{
		start = 1f;
		end = 0.05f;
	}

	public void Awake()
	{
		Screen.sleepTimeout = -1;
		if (show)
		{
			StartCoroutine(find());
		}
		StateManager.playing = true;
	}

	public void Update()
	{
		if (UnityEngine.Input.GetKeyDown(KeyCode.Menu) || UnityEngine.Input.GetKeyDown(KeyCode.Escape))
		{
			Pause();
		}
	}

	public void Pause()
	{
		AudioSource.PlayClipAtPoint(clip, Camera.main.transform.position);
		UnityEngine.Object.Instantiate(Resources.Load("ShowAdsR"));
		Time.timeScale = 0.01f;
		Time.fixedDeltaTime = 0.00132f;
		restartbutton.enabled = true;
		back.enabled = true;
		enabled = false;
	}

	public IEnumerator restart()
	{
		return new _0024restart_0024445(this).GetEnumerator();
	}

	public IEnumerator find()
	{
		return new _0024find_0024448(this).GetEnumerator();
	}

	public void Main()
	{
	}
}
